package com.javasm.crm.controller.aftersale;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.javasm.crm.common.http.AxiosResult;
import com.javasm.crm.domin.criteria.repositrory.OutOrderCriteria;
import com.javasm.crm.domin.entity.aftersale.Outorder;
import com.javasm.crm.service.aftersale.IOutorderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lirui
 * @since 2021-07-14
 */
@RestController
@RequestMapping("/crm/outorder")
public class OutorderController {

    @Resource
    private IOutorderService outorderService;

    @GetMapping("getOutOrder")
    @ApiOperation(value = "获得出库订单", notes = "入库申请审核，同时更改对应的出库申请单状态")
    public AxiosResult getOutOrder(OutOrderCriteria outOrderCriteria){

        Page<Outorder> outOrder = outorderService.getOutOrder(outOrderCriteria);

        return AxiosResult.success(outOrder);
    }
}
